package com.cqs.learning.spring.cloud.app.context;

import com.cqs.learning.spring.cloud.app.bean.vo.QueryContextInfo;

/**
 * @author lixw
 * @date 2020/4/14 22:43
 */
public class QueryContext {

    private static ThreadLocal<QueryContextInfo> threadLocal = ThreadLocal.withInitial(QueryContextInfo::new);

    public static QueryContextInfo getContext() {
        return threadLocal.get();
    }

    public static void setContext(QueryContextInfo info) {
        threadLocal.set(info);
    }
}
